#include "dosVisualize.hpp"

int main()
{
    string path = "../maps/0.map";
    MainProcess mainp(path);

    int movement;
    string attachText = "Please input by 'WASD'";

    cout<<"the number of Box and Target Point is "<< mainp.state.box.size() << ","<<mainp.state.target.size()<<endl;
    cout << "Program start!" << endl;

    while (1)
    {
        movement = showState(mainp, attachText, 0, true);
        if (movement == 'q' || movement == 'Q')
            break;
        movement = mainp.MoveToward(movement);
        switch (movement)
        {
        case 1:
            attachText = "Movement is block by the Wall";
            break;
        case 2:
            attachText = "Movement is block by 2 boxes";
            
        case 3:
            attachText = "Movement is block by  box + wall";
        case -1:
            attachText = "........";
            break;
        case 0:
            attachText = "    ";
            break;
        }
        if (mainp.check())
        {
            attachText = "achieve the target Successfully!!!\n";
            break;
        }
    }
    showState(mainp.state, attachText, 0, false);
    cout << "Program end!" << endl;
    return 0;
}